function sku_cal(index, listArray, strs, res) {
    if (index >= listArray.length) {
        return;
    } else {
        index++;
    }
    let lists = listArray[index - 1]
    for (let i = 0; i < lists.length; i++) {
       let list = lists[i]
        strs.push(list.name);
        sku_cal(index,listArray,strs,res)
        if (index == listArray.length) {
            res.push(listToString(strs))
            strs.pop()
        }
    }
    strs.pop();
}

function listToString(lists) {
    let str = '';

    for (let i in lists) {
        str = str + lists[i] + '-';
    }
    return str.substr(0, str.length - 1);
}


export function sku(listArray) {
    let index = 0;
    let res = []
    let strs = []
    sku_cal(index, listArray, strs, res)
    return res;
}

